<?php
if(isset($_POST['s']))
{
require("includes/basic.php");
$s=$_POST['s'];
$phase=mysql_query("select * from phase_master where LOWER(phase) like LOWER('$s%')");
}
else
{
$phase=mysql_query("select * from phase_master");
$noOfphases=mysql_num_rows($phase);
}
$sr=1;
$class="evenrowbg";
?>
	<table width='100%' cellpadding='1' cellspacing='0' class='list'>
	<tr>
		<th width='10%' style='white-space: nowrap;'>
			<div style='display:block; '>
				<span class="link linkdisabled">Sr no.</span>
			</div>
		</th>        
        <th width='10%' style='white-space: nowrap;'>
			<div style='display:block;'>
				<span class="link linkdisabled">Edit</span>
			</div>
		</th>
        
        <th width='30%' style='white-space: nowrap;'>
			<div style='display:block; '>
				<span class="link linkdisabled">Phase Name</span>
			</div>
		</th>
		<th width='50%' style='white-space: nowrap;'>
			<div style='display:block;'>
				<span class="link linkdisabled">Phase Description</span>
			</div>
		</th>
		<!--<th width='40%' style='white-space: nowrap;'>
			<div style='display:block; width: 20px;'>
				<span class="link linkdisabled">Customer Username</span>
			</div>
		</th>
		<th width='4%' style='white-space: nowrap;' align='center'>
			<span class="link linkdisabled">Customer Password</span>
		</th>
		<th width='20%' style='white-space: nowrap;'>
			<span class="link linkdisabled">Record Status</span>
		</th>-->
		<!--<th width='10%' style='white-space: nowrap;'>
			<span class="link">Status</span>
		</th>-->
		<!--<th width='0' class='select'>
			<form name="frm">
<input type='checkbox' class='checkbox' name='allCheck' onClick='selectallMe()'>
		</th>-->
	</tr>
	<?php while($phasetr=mysql_fetch_array($phase))
	{
		$phaseid=$phasetr['phase_id'];
		$phasename=$phasetr['phase'];
		$phase_desc=$phasetr['phase_desc'];			
		if($class=="evenrowbg")
		{
			$class="oddrowbg";
		}
		else
		{
			$class="evenrowbg";
		}
		echo "<tr class='$class'><td style='text-align:center;'>$sr</td>";
		echo "<td style='text-align:center;'><a href='edit-phases.php?phaseid=$phaseid'><img src='images/edit.png'/></a></td>";
		
		echo "<td style='padding:5px; '>".$phasename."</td><td style='padding:5px;'>".$phase_desc."</td>";		
		$sr++;
	}
	?>
</table>